<p class="Paragraph"><help:paragraphinfo state="U" number="2"/>Returns a <span style="font-weight:bold;">Date</span> value for a specified year, month, or day.<a name="ende"/></p>
<p class="Paragraph"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Year:</span> Integer expression that indicates a year. All values between 0 and 99 are interpreted as the years 1900-1999. For years that fall outside this range, you must enter all four digits.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Month:</span> Integer expression that indicates the month of the specified year. The accepted range is from 1-12.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="10" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Day:</span> Integer expression that indicates the day of the specified month. The accepted range is from 1-31, depending on the month.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="11" xmlns:help="http://openoffice.org/2000/help"/>The <span class="T1">DateSerial function</span> returns the number of days between December 30,1899 and the given date. You can use this function to calculate the difference between two dates.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="12" xmlns:help="http://openoffice.org/2000/help"/>The <span class="T1">DateSerial function</span> returns the data type Variant with VarType 7 (Date). Internally, this value is stored as a Double value, so that when the given date is 1.1.1900, the returned value is 2. Negative values correspond to dates before December 30, 1899 (not inclusive).</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="13" xmlns:help="http://openoffice.org/2000/help"/>If a date is defined that lies outside of the accepted range, <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic returns an error message.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="14" xmlns:help="http://openoffice.org/2000/help"/>Whereas you define the <span class="T1">DateValue function</span> as a string that contains the date, the <span class="T1">DateSerial function</span> evaluates each of the parameters (year, month, day) as separate numeric expressions.</p>